Skip to content

fix(engine): preserve readlink errno for fs mounts#12

Open
wolfy-j wants to merge 1 commit into
mainfrom
fix/r-wasi-normalizepath
Open

fix(engine): preserve readlink errno for fs mounts#12
wolfy-j wants to merge 1 commit into
mainfrom
fix/r-wasi-normalizepath

Conversation

@wolfy-j

@wolfy-j wolfy-j commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • mount read-only fs.FS WASI filesystems through a sysfs adapter instead of wazero's generic WithFSMount adapter
  • preserve POSIX-style readlink behavior for existing non-symlink paths: return EINVAL instead of ENOSYS
  • add a WASI preview1 regression test covering path_readlink on a regular file from an in-memory mount

Validation

  • go test ./engine -run TestWazeroEngine_FSMountReadlinkRegularFile -count=1
  • go test ./wat
  • built wippy runtime with a temporary go.work pointing at this branch
  • installed real hub dependency wippy-langs/r@0.2.6 in packed .wapp mode without options.unpack_modules
  • /tmp/wippy-r-demo-packed: wippy run -c -x app:r_format_probe passed normalizePath, stats::t.test, png/svg/pdf plots
  • /tmp/wippy-r-demo-packed: wippy run test passed 2/2
  • generated /tmp/wippy-r-demo-packed/scratch/plot.png: valid 800x600 PNG

Note

  • go test ./engine currently fails on origin/main and this branch in TestMemoryReleaseOnClose with the same heap-growth assertion; this is baseline debt and unrelated to this patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant